package hello.controller.hoge;

import hello.model.TechPost;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.datastore.Datastore;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

public class IndexController extends Controller {

    @Override
    public Navigation run() throws Exception {
        
/*        TechPost techPost = new TechPost();
        Key key = Datastore.createKey(TechPost.class, "twitter2222222333333");
        techPost.setKey(key);
        techPost.setString("yattaa----------");
        Datastore.put(techPost);
        String s = Datastore.keyToString(key);
        this.requestScope("hoge", s);
        */
        
        Key key = Datastore.createKey(TechPost.class, "twitter2222222333333");
//        TechPost post = Datastore.get(TechPost.class, key);
//        TechPost post = new TechPost();
//        post.setKey(key);
//        post.setString(string)
//        String param = this.request.getParameter("abc");
        String param2 = this.request.getQueryString();
//        String param3 = this.request.getParameter("abc");
        String a = asString("abc");
        String param3 = a;
        
        
        
 //       String a = this.request.
//        post.setString(string)
        System.out.println(param3);       
        this.requestScope("hoge", param3);
        
        
        return forward("index.jsp");
    }
    
    
}
